//
//  KqOssManager.h
//  Pods
//
//  Created by wtb on 2023/3/9.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface KqOssManager : NSObject
//创建oss对象
+(instancetype)defaultKqOssManager;
//oss相关配置
-(void)initOSSClient;
//当前oss仓库环境设置;如果是打包发布，isRelease设置YES
-(void)setOssBucketNameFromEnv:(BOOL)isRelease;

//下载
-(void)downLoadImage:(NSString *)objectKey picWidth:(int)width picHeight:(int)height tag:(NSString *)tag callback:(void(^)(NSDictionary *uri))callback;
//上传
-(void)uploadImage:(NSData *)imageData objectKey:(NSString *)objectKey callback:(void(^)(BOOL success))callback;

-(void)uploadFile:(NSData *)fileData objectKey:(NSString *)objectKey progress:(void(^)(int64_t bytesSent, int64_t totalBytesSent, int64_t totalBytesExpectedToSend))progressCallback tag:(NSString *)tag callback:(void(^)(BOOL success))callback;

//取消
+(void)cancel:(NSString *)tag;

//删除
+(void)deleteImage:(NSString *)objectKey callback:(void(^)(BOOL success))callback;
@end

NS_ASSUME_NONNULL_END
